Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Handle optional language tag in header #497

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

darcywong00
Copy link
Contributor

@darcywong00 darcywong00 commented Nov 4, 2024

Follows #489 fixes #496 and fixes KEYMAN-COM-1CX

where $fields->language was undefined.

This also propagates the optional header language if it's set. I would expect most pages fallback to en

if(empty($fields->language)) {
$fields->language = 'en'; // Default to English
}

@darcywong00 darcywong00 added this to the A18S14 milestone Nov 4, 2024
@darcywong00 darcywong00 added the fix label Nov 4, 2024
Copy link
Member

@mcdurdin mcdurdin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the PHP header stuff is a bit icky but I am not keen on trying to fix it in the near-term.

LGTM.

@darcywong00
Copy link
Contributor Author

Force push to fixup the commit msg for closing the Sentry issue

@darcywong00 darcywong00 merged commit 92b2c49 into master Nov 4, 2024
2 checks passed
@darcywong00 darcywong00 deleted the fix/language-undefined branch November 4, 2024 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug ErrorException: Notice: Undefined property: stdClass::$language
2 participants